import { mapGetters, mapMutations } from 'vuex'

const mixin = {
  data() {
    return {
      isWx: /micromessenger/i.test(navigator.userAgent)
    }
  },
  methods: {
    keyWordResize() {
      // 软键盘弹出的时候 隐藏底部footer
      const screenH = document.body.scrollHeight
      window.onresize = function () {
        if (document.body.scrollHeight < screenH) {
          document.getElementById('footer_container').style.display = 'none'
        } else {
          document.getElementById('footer_container').style.display = 'block'
        }
      }
    },
    noBomBox(Event) {
      // 阻止键盘弹起
      document.activeElement.blur()
    }
  }
}

export default mixin
